﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace OnTheWay.Controls
{
    /// <summary>
    /// WaitingControl.xaml 的交互逻辑
    /// </summary>
    public partial class WaitingControl : UserControl
    {
        public WaitingControl()
        {
            InitializeComponent();
        }

        #region 依赖属性



        public string WaitMessage
        {
            get { return (string)GetValue(WaitMessageProperty); }
            set { SetValue(WaitMessageProperty, value); }
        }

        // Using a DependencyProperty as the backing store for WaitMessage.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty WaitMessageProperty =
            DependencyProperty.Register("WaitMessage", typeof(string),
            typeof(WaitingControl), new UIPropertyMetadata("正在加载数据..."));



        public string CompanyName
        {
            get { return (string)GetValue(CompanyNameProperty); }
            set { SetValue(CompanyNameProperty, value); }
        }

        // Using a DependencyProperty as the backing store for CompanyName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty CompanyNameProperty =
            DependencyProperty.Register("CompanyName", typeof(string),
            typeof(WaitingControl), new UIPropertyMetadata(""));



        public string ApplicationName
        {
            get { return (string)GetValue(ApplicationNameProperty); }
            set { SetValue(ApplicationNameProperty, value); }
        }

        // Using a DependencyProperty as the backing store for ApplicationName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ApplicationNameProperty =
            DependencyProperty.Register("ApplicationName", typeof(string),
            typeof(WaitingControl), new UIPropertyMetadata(""));



        public ImageSource Icon
        {
            get { return (ImageSource)GetValue(IconProperty); }
            set { SetValue(IconProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Icon.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IconProperty =
            DependencyProperty.Register("Icon", typeof(ImageSource),
            typeof(WaitingControl), new UIPropertyMetadata(null));



        #endregion
    }
}
